{layout name="p/base"}
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>房车管理 <small>房车分类</small></h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li><a href="/carcate"><i class="fa fa-dashboard"></i> 房车分类列表</a></li>
          <li class="active"><i class="fa fa-table"></i> 修改房车分类</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          请设置分类信息
        </div>
      </div>
    </div>
    <!-- /.row -->
    <form class="form-horizontal" id='editcate' role="form" action="/carcate/{$id}" method="post">
      <input type="hidden" id='method' name="_method" value="PUT">
      <h4>编辑车型</h4>
      <div class="form-group">
        <label class="control-label col-sm-3">名称</label>
        <div class="col-sm-9">
        <input class="form-control" type="text" name="name" value="{$data.name}" placeholder="请正确填写车型名称">
        </div>
      </div>
      <div class="form-group">
        <label class="control-label col-sm-3">描述</label>
        <div class="col-sm-9">
        <input class="form-control" type="text" name="profiles" value="{$data.profiles}" placeholder="请对车型简单描述">
        </div>
      </div>
      <div class="modal-footer">
        <input type="button" value="返回" class="btn btn-default"  onclick="javascript:history.back(-1);" />
        <a type="button" id='edit' data-id='{$data.id}' class="btn btn-primary">提交</a>
      </div>
    </form>
  </div><!-- /#page-wrapper -->

<script type="text/javascript" src="/jquery.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
    $("#edit").click(function(){
      $("#editcate").submit();
      });
    });
</script>